﻿// JavaScript Document
$(document).ready(function(){
	 $.get("flash/flash.htm?time=" + Math.random(), function(data){
 	$("#flash_load").html(data);
  });					   
});


$(function(){
// 收索框		   
//$("#searchWords").click(function(){
//	$("#searchWords").val("");
//	//alert($("#searchWords").val());
//});		   
//$("#searchWords").blur(function(){
//	$("#searchWords").val("请输入关键字");
//	alert($("#searchWords").val());
//});
//
//$(".s_btn").click(function(){
//	alert($("#searchWords").val());
//});	

$("#searchWords").val("请输入关键字").focus(function(){ 
	if($(this).val() == "请输入关键字"){
		$(this).val("");
	}
}).blur(function(){
	if($(this).val() == ""){
		$(this).val("请输入关键字");
	}
});


//弹出菜单样式
$(".akimi_topcenter li").hover(
  function() {
	var i = $(".akimi_topcenter li").index(this);
	if (i!=0)
	{
		$(this).css({"background":"#55A01E","cursor":"pointer","color":"#FFFFFF"}); 
		var x =(document.body.clientWidth/2);
		$(".akimi_nva").css({"left": + (x- 240) + "px"});
		$("#menu_"+i).slideDown("slow"); 
	}
  },
  function(){
	var i = $(".akimi_topcenter li").index(this);
	if (i!=0)
	{	
		$(this).css({"background":"#FFFFFF","color":"#000000"});
		$("#menu_"+i).slideUp(100); 
	}
});


$(".akimi_nva span").hover(
  function () {
	$(this).addClass("hover_nav");
  },
  function(){
   $(this).removeClass("hover_nav");
});


//购物车样式
var slideCartTime;
$('#cartId').hover(
function(){
	$(this).attr('class','cartOn');
	$(this).css({"background":"url(images/shopping_img1.jpg) no-repeat 8px center","background-color":"#62B326","cursor":"pointer","text-align":"center"});
	$("#cartId A").css({"text-decoration":"none","color":"#FFFFFF"});		
	$('#cartGoods').show();
	if(slideCartTime != null) clearTimeout(slideCartTime);
},
function(){
	$(this).css('myCart');
	$(this).addClass("cartOut");
	$(this).css({"background":"url(images/shopping_img.gif) no-repeat 8px center","background-color":"#FFF","text-align":"center"});
	$("#cartId A").css({"text-decoration":"none","color":"#76A73A"});
	$('#cartGoods').hide();
}); 

//我的阿基米米
$('#aKimimi').hover(
function(){
	$(this).attr('class','akimimiOn');
	$(this).css({"background":"url(images/my_img1.jpg) no-repeat 8px center","background-color":"#62B326","cursor":"pointer","text-align":"center"});
	$("#aKimimi A").css({"text-decoration":"none","color":"#FFFFFF"});
	$('#myMimi').show();
},
function(){
	$(this).css({"background":"url(images/my_img.gif) no-repeat 8px center","background-color":"#FFF","text-align":"center"});
	$("#aKimimi A").css({"text-decoration":"none","color":"#76A73A"});
	$('#myMimi').hide();
}); 

//我的阿基米米下拉菜单鼠标经过样式
$('#myMimi li').hover(
function(){
	$(this).css({"background":"#55A01E","cursor":"pointer","color":"#FFFFFF"});
},
function(){
	$(this).css({"background":"#FFFFFF","color":"#444444"});
}); 


//了解boy
$('.r_kf a').hover(
function(){
	$(this).css({"background":"#74DF42","cursor":"pointer","color":"#FFFFFF"});
},
function(){
	$(this).css({"background":"#FFFFFF","color":"#666666"});
});

// 选项卡
$("div.cu_top ul li").click(function(){					   
	$(this).attr("class","title_2").siblings().attr("class","title_1");	
		var index = $("div.cu_top ul li").index(this);	
		$("div.cu_body > div")   	
				.eq(index).show()   
				.siblings().hide();
});

//商品分类鼠标经过样式
$('#class_border span:not(.seperator)').hover(
function(){
	$(this).addClass("classhover");
	//$(this).find("a").addClass("classhovera");
},
function(){
	$(this).removeClass("classhover");
	//$(this).find("a").removeClass("classhovera");
});

//鼠标经过商品样式
$('.pro_list img').hover(
function(){
	$(this).css({"border":"solid #55A01E 1px","cursor":"pointer"});
},
function(){
	$(this).css({"border":"solid #E5E5E5 1px"});
});

//鼠标经过促销商品图片
$('.cu_list img').hover(
function(){
	$(this).css({"border":"solid #55A01E 1px","cursor":"pointer"});
},
function(){
	$(this).css({"border":"solid #E5E5E5 1px"});
});

//鼠标经过商品分类图片样式
$('div.pro_list img').hover(
function(){
	$(this).css({"border":"solid #55A01E 1px","cursor":"pointer"});
},
function(){
	$(this).css({"border":"solid #E5E5E5 1px"});
});

});
